package com.ruoyi.reception;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.receipt.domain.Poic;
import com.ruoyi.receipt.utils.WordUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/reception/word")
public class WordController extends BaseController {
    @GetMapping("/urlpath")
    public String wordurl(){

        Poic poic=new Poic();
        poic.setName("张三");
        poic.setAge("18");
        poic.setWeChatPicture("d:\\moban\\1.jpg");
        poic.setPicture("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
        Poic poic1=new Poic();
        poic1.setName("李四");
        poic1.setAge("19");
        poic1.setWeChatPicture("d:\\moban\\3.jpg");
        poic1.setPicture("https://res.wx.qq.com/a/wx_fed/weixin_portal/res/static/img/1EtCRvm.png");
        List list =new ArrayList();
        list.add(poic);
        list.add(poic1);
        String word=null;
        WordUtil wordUtil=new WordUtil();
        try {
            word = wordUtil.word(list);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return  word;
    }




}
